<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menus', function (Blueprint $table) {
            $table->increments('id');
			$table->string('name')->default('')->comment('名称');
			$table->integer('pid')->unsigned()->default(0)->comment('父级ID');
			$table->tinyInteger('level')->default(0)->comment('层级');
			$table->string('icon')->default('')->comment('图标');
			$table->string('permission')->default('')->comment('权限');
			$table->integer('sort')->unsigned()->default(0)->comment('排序');
			$table->tinyInteger('is_url')->default(0)->comment('是否为链接');
			$table->tinyInteger('is_show')->default(1)->comment('是否显示');
			$table->string('remark')->default('')->comment('备注');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('menus');
    }
}
